import React from "react";
import { ToastContainer, Bounce, toast } from "react-toastify";
import "react-toastify/dist/ReactToastify.css";
/**
 * 请记住在应用程序树中渲染ToastContainer 一次。如果您无法弄清楚将其放置在哪里，那么将其呈现在应用程序根目录中将是最好的选择。
 * @returns Toast
 */
const Toast = () => {
  return (
    <ToastContainer
      className="border-[#3A5245]"
      position="top-center"
      autoClose={3000}
      hideProgressBar
      newestOnTop={false}
      closeOnClick
      rtl={false}
      pauseOnFocusLoss={false}
      draggable
      pauseOnHover={false}
      theme="colored"
      transition={Bounce}
    />
  );
};

export { toast, Toast };
export default React.memo(Toast);
